//
//  QQW-iOS-Macro.h
//  QQW-iOS-Macro
//
//  Created by 武怀安 on 2018/4/22.
//  Copyright © 2018年 武怀安. All rights reserved.
//
#import "UIColor+YYAdd.h"
#import "UIView+YYAdd.h"
#import "YYCGUtilities.h"
#import "UIGestureRecognizer+YYAdd.h"
#import "CacheTool.h"
#import "DataTool.h"
#import "NSString+Verification.h"


/**
 cellID 获取当前控制器名
*/
#define KCellIdentifier NSStringFromClass([self class])

//-------------------单例化一个类-------------------------//
#define DEFINE_SINGLETON_INTERFACE(className) \
+ (className *)shared##className;


#define DEFINE_SINGLETON_IMPLEMENTATION(className) \
static className *shared##className = nil; \
static dispatch_once_t pred; \
\
+ (className *)shared##className { \
dispatch_once(&pred, ^{ \
shared##className = [[super allocWithZone:NULL] init]; \
if ([shared##className respondsToSelector:@selector(setUp)]) {\
[shared##className setUp];\
}\
}); \
return shared##className; \
} \
\
+ (id)allocWithZone:(NSZone *)zone { \
return [self shared##className];\
} \
\
- (id)copyWithZone:(NSZone *)zone { \
return self; \
}
//-------------------单例化一个类-------------------------//

